home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / graphics / pstex / std.h < prev   
C/C++ Source or Header  |  1992-01-27  |  1KB  |  55 lines

  1. /*
  2.  * Standard definitions.
  3.  *
  4.  * Neil Hunt (Neil%Teleos.com@ai.sri.com).
  5.  *
  6.  * Copyright (c) 1989 Teleos Research, Inc 1989.
  7.  * Copyright (c) 1988 Schlumberger Technologies, Inc 1988.
  8.  *
  9.  * Anyone can use this software in any manner they choose,
  10.  * including modification and redistribution, provided they make
  11.  * no charge for it, and these conditions remain unchanged.
  12.  *
  13.  * This program is distributed as is, with all faults (if any), and
  14.  * without any wrranty.  No author or distributor accepts responsibility
  15.  * to anyone for the consequences of using it, or for whether it serves any
  16.  * particular purpose at all, or any other reason.
  17.  *
  18.  * $Log:    std.h,v $
  19.  * Revision 1.1  89/02/10  18:41:57  neil
  20.  * Initial revision
  21.  * 
  22.  */
  23.  
  24. #ifndef _TYPES_
  25. typedef unsigned int        uint;
  26. typedef short            ushort;
  27. #endif /* _TYPES_ */
  28. typedef unsigned char        uchar;
  29. #ifdef bool
  30. #undef bool
  31. #endif /* bool */
  32. typedef unsigned int        bool;
  33.  
  34. #define DEL            '\177'
  35. #define ESC            '\033'
  36. #define Control(c)        ((c) - 0x40)
  37.  
  38. #define forward            extern
  39.  
  40. #define Range(min, x, max)    (((x) < (min))? \
  41.                  (min) : (((x) > (max))? (max) : (x)) \
  42.                 )
  43.  
  44. #define MAXINT            2147483647
  45. #define NEGMAXINT        (-2147483648)
  46.  
  47. #ifndef TRUE
  48. #define TRUE            1
  49. #define FALSE            0
  50. #endif  /* TRUE */
  51.  
  52. #define Abs(n)            (((n) >= 0.0)? (n) : -(n))
  53. #define Min(a, b)        ((a) > (b)? (b) : (a))
  54. #define Max(a, b)        ((a) < (b)? (b) : (a))
  55.